package com.daigou.enums;

/**
 * 
* 项目名称：monkey 
* 类名称：EmailTypeEnum   
* 类描述：EmailTypeEnum 邮箱类型枚举表述常量数据字段   
* 创建人：lizhi   
* 创建时间：2017年2月3日 下午5:15:45
 */
public enum EmailTypeEnum {

	REGISTER(1, "账号注册","【账号注册通知】", "Welcome.vm"), 
	AUDIT(2, "店主审核通知","【店主审核通知】", "AuditOrder.vm"),
	INFORM(3, "客户下单通知","【客户下单通知】", "MakeOrder.vm");

    private Integer type;
    
    private String typeInfo;
    
    private String emailSubject;
    
    private String velocityTemplate;

	private EmailTypeEnum(Integer type, String typeInfo, String emailSubject, String velocityTemplate) {
		this.type = type;
		this.typeInfo = typeInfo;
		this.emailSubject = emailSubject;
		this.velocityTemplate = velocityTemplate;
	}

	public Integer getType() {
		return type;
	}

	public String getTypeInfo() {
		return typeInfo;
	}
	
	public String getEmailSubject() {
		return emailSubject;
	}
	
	public String getVelocityTemplate() {
		return velocityTemplate;
	}

	public static EmailTypeEnum stateOf(int index) {
		for (EmailTypeEnum statusEnum : values()) {
			if (statusEnum.getType() == index) {
				return statusEnum;
			}
		}
		return null;
	}
}